<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
 response.setHeader("P3P","CP=CAO PSA OUR");//ie的cookie机制导致session无法保存，加这句代码解决
 String PAGE_TITLE_SET=(String)request.getAttribute("PAGE_TITLE");
 String PAGE_DESC_SET=(String)request.getAttribute("PAGE_DESC_SET");
 String PAGE_KEYWORD_SET=(String)request.getAttribute("PAGE_KEYWORD_SET");
 if(PAGE_TITLE_SET==null||PAGE_TITLE_SET.equals("")){
     PAGE_TITLE_SET="";
 }else{
     PAGE_TITLE_SET=PAGE_TITLE_SET+"_";
 }
 PAGE_TITLE_SET=PAGE_TITLE_SET+"安徽宣城医药   药品采购、药品批发就去安徽宣城医药B2B电子商务平台";
 if(PAGE_DESC_SET==null||PAGE_DESC_SET.equals("")){
     PAGE_DESC_SET="安徽宣城医药-医药电子商务平台,主要提供药品批发,医药招商采购,医药产品,医药市场,医药行情,医药企业查询,药品代理及相关药品资讯,医药政策法规资讯服务";
 }
 if(PAGE_KEYWORD_SET==null||PAGE_KEYWORD_SET.equals("")){
     PAGE_KEYWORD_SET="安徽宣城医药,医药网,药批网,药品批发,医药招商";
 }
 
%>
<title><decorator:title default="安徽宣城医药" /></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content="all" name="robots" />
<meta http-equiv=Expires content=0 />
<meta http-equiv="windows-Target" contect="_top" />
<meta name="description" content="<%=PAGE_DESC_SET %>" />
<meta name="keywords" content="<%=PAGE_KEYWORD_SET %>" />
<meta name="Copyright" content="Copyright @ B2B医药电子商务 http://www.zc511.com"  />
<meta name="renderer" content="webkit">
<meta http-equiv="Expires" content="0" />
<meta http-equiv="kiben" content="no-cache" />
<%@include file="/views/jsp/include/cssAndJs.jsp" %>
<link rel="stylesheet" type="text/css" href="<c:url value="/views/jsp/center/resources/easyui/themes/icon.css" />" />
<link href="<c:url value="/views/jsp/center/resources/styles/common.css" />" rel="stylesheet" type="text/css" />
<link href="<c:url value="/views/jsp/center/resources/styles/helpcenter.css" />" rel="stylesheet" type="text/css" />
<link href="<c:url value="/views/jsp/center/resources/styles/vipcenter.css" />" rel="stylesheet" type="text/css" />
<link href="<c:url value="/views/jsp/center/resources/easyui/index.css" />" rel="stylesheet" type="text/css" />
<link href="<c:url value="/views/jsp/center/resources/easyui/css.css" />" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value="/views/jsp/center/resources/easyui/jquery.easyui.min.js" />"></script>
<script type="text/javascript" src="<c:url value="/views/jsp/center/resources/easyui/easyui-extends.js" />"></script>
<script type="text/javascript" src="<c:url value="/views/jsp/center/resources/easyui/easyui-lang-zh_CN.js" />"></script>
<script type="text/javascript" src="<c:url value="/views/jsp/center/resources/easyui/pms-util.js" />"></script>
<link href="<c:url value="/views/jsp/center/resources/easyui/themes/gray/easyui.css" />" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value="/js/plug/autocomplete/jquery.autocomplete.js" />"></script>
<link href="<c:url value="/js/plug/autocomplete/jquery.autocomplete.css" />" rel="stylesheet" type="text/css" />
<style>
	.pro_list span{padding:0}.weizhi .j{padding-right:10px;background:url('<c:url value="/views/jsp/center/resources/images/list/jt.jpg" />') no-repeat right}.weizhi .end{padding-right:10px;background:0;color:#00baba}.center-main{width:800px}.tabs-title{font-size:15px;font-weight:bold;color:#35437d}table a{color:#35437d}.btn-go{padding:0 26px;height:36px;font:400 18px/36px arial;font-size:18px;font-family:'\65b9\6b63\6b63\9ed1\7b80\4f53','\5fae\8f6f\96c5\9ed1','\9ed1\4f53';background-color:#f50;color:#fff;text-align:center;cursor:pointer;_display:block;display:inline-block;margin-left:10px}.datagrid-row{height:35px}
</style>

 <%-- 引入扩展图标 --%>
 <%-- 引入扩展图标 --%>
<link rel="stylesheet" href="<c:url value='/views/jsp/center/resources/easyui/sy/syExtIcon.css?version=20131115' />" type="text/css" />
<%-- 引入自定义样式 --%>
<link rel="stylesheet" href="<c:url value='/views/jsp/center/resources/easyui/sy/syExtCss.css?version=20131115' />" type="text/css" />
  
<c:if test="${empty sessionScope.WEB_USER_TOKEN && empty sessionScope.WEB_PROVIDER_TOKEN && empty sessionScope.WEB_AGENT}">
	   	<script>
			location.href='<c:url value="/views/jsp/login.jsp" />?lastUrl='+document.location;
	   	</script>
</c:if>
</head>
<body>
	<c:import url="/views/jsp/include/_notes.jsp" />
 	<div class="header">
	<div class="header_header">
    	<div class="header_top">
    	
        	<div class="header_top_left">
        		<c:if test="${not empty sessionScope.WEB_USER_TOKEN}">
        		<c:choose>
        		  <c:when test="${not empty sessionScope.WEB_USER_TOKEN.agentToken}">
	        		  <c:choose>
							<c:when test="${sessionScope.WEB_USER_TOKEN.agentToken.agentName ne ''}">
								<p><span><b style="color: #35437d">${sessionScope.WEB_USER_TOKEN.agentToken.agentName }</b>    您好，欢迎访问“安徽宣城医药”,您正在代理采购商！</span></p>
							</c:when>
							<c:otherwise>
								<p><span><b style="color: #35437d">${sessionScope.WEB_USER_TOKEN.agentToken.loginName }</b>  您好，欢迎访问“安徽宣城医药”,您正在代理采购商！</span></p>
							</c:otherwise>
					  </c:choose>
				  </c:when>
				  <c:otherwise>
				      <c:choose>
							<c:when test="${sessionScope.WEB_USER_TOKEN.userName ne ''}">
								<p><span><b style="color: #35437d">${sessionScope.WEB_USER_TOKEN.userName }</b>    您好，欢迎访问“安徽宣城医药”！</span></p>
							</c:when>
							<c:otherwise>
								<p><span><b style="color: #35437d">${sessionScope.WEB_USER_TOKEN.loginName }</b>  您好，欢迎访问“安徽宣城医药”！</span></p>
							</c:otherwise>
				      </c:choose>
				</c:otherwise>
				</c:choose>
				
				<c:if test="${sessionScope.WEB_USER_TOKEN.agentFlag eq true}">
					<a href="<c:url value="/agentuser/cancelAgent.s"/>"  style="width:60px;">取消代理</a>
				</c:if>
				</c:if>
				
				<c:if test="${not empty sessionScope.WEB_PROVIDER_TOKEN}">
				<c:choose>
        		  <c:when test="${not empty sessionScope.WEB_PROVIDER_TOKEN.agentToken}">
	        		  <c:choose>
							<c:when test="${sessionScope.WEB_PROVIDER_TOKEN.agentToken.agentName ne ''}">
								<p><span><b style="color: #35437d">${sessionScope.WEB_PROVIDER_TOKEN.agentToken.agentName }</b>    您好，欢迎访问“安徽宣城医药”,您正在代理供货商！</span></p>
							</c:when>
							<c:otherwise>
								<p><span><b style="color: #35437d">${sessionScope.WEB_PROVIDER_TOKEN.agentToken.loginName }</b>  您好，欢迎访问“安徽宣城医药”,您正在代理供货商！</span></p>
							</c:otherwise>
					  </c:choose>
				  </c:when>
				  <c:otherwise>
				      <c:choose>
							<c:when test="${sessionScope.WEB_PROVIDER_TOKEN.userName ne ''}">
								<p><span><b style="color: #35437d">${sessionScope.WEB_PROVIDER_TOKEN.userName }</b>    您好，欢迎访问“安徽宣城医药”！</span></p>
							</c:when>
							<c:otherwise>
								<p><span><b style="color: #35437d">${sessionScope.WEB_PROVIDER_TOKEN.loginName }</b>  您好，欢迎访问“安徽宣城医药”！</span></p>
							</c:otherwise>
				      </c:choose>
				</c:otherwise>
				</c:choose>
				
				<c:if test="${sessionScope.WEB_USER_TOKEN.agentFlag eq true}">
					<a href="<c:url value="/agentuser/cancelAgent.s"/>"  style="width:60px;">取消代理</a>
				</c:if>
				</c:if>
				
				<c:if test="${not empty sessionScope.WEB_AGENT}">
				<c:choose>
					<c:when test="${sessionScope.WEB_AGENT.agentName ne ''}">
						<p><span><b style="color: #35437d">${sessionScope.WEB_AGENT.agentName }</b>    您好，欢迎访问“安徽宣城医药”！</span></p>
					</c:when>
					<c:otherwise>
						<p><span><b style="color: #35437d">${sessionScope.WEB_AGENT.loginName }</b>  您好，欢迎访问“安徽宣城医药”！</span></p>
					</c:otherwise>
				</c:choose>
				</c:if>
                <a href="<c:url value="/user/loginOut.s" />">退出</a>
            </div>
            <div class="header_top_right">
            	<ul>
<%--             		<c:if test="${not empty sessionScope.WEB_USER_TOKEN}">
	                	<li>
	                    	<a href="<c:url value="/views/jsp/center/trade/shoppingcart/c_shopping_cart_list.jsp" />" style="padding-left:32px; background:url('<c:url value="/views/jsp/center/resources/images/common/gwc.gif" />') no-repeat left;">购物车</a>
	                    </li>
	                    <li>
	                    	<a href="<c:url value="/views/jsp/center/trade/order/c_order_list.jsp" />">我的订单</a>
	                    </li>
                    </c:if> --%>
                    <li>
                    	<a href="<c:url value="/views/jsp/center/c_user_center.jsp" />">会员中心</a>
                    </li>
                    
                </ul>
            </div>
        </div>
    </div>
    
    
    
    
    <div class="header_content">
        	<div class="header_content_left">
            	<a href="<c:url value="/showIndex.s" />">
                	<img src="<c:url value="/resources/images/common/logo.png" />"  />
                </a>
            </div>
            <div class="header_content_main">
           		 <form action="<c:url value="/product/searchProduct.s" />" method="post"  id="inc_searchProductForm" >
            		<img src="<c:url value="/views/jsp/center/resources/images/common/fangdajing.jpg" />" width="36" height="29" onclick="searchf()" />
	                <c:if test="${empty result.data.svo.searchWhere || result.data.svo.searchWhere eq ''}">
	                  <input type="text" class="search" value="可输入:药品名|编号|厂家|中药输小数点." name="searchWhere" id="summary"  onclick="clr()" onkeydown="pms.kd13('searchf')"/>
	                </c:if>
	             </form>
            </div>
            <div class=smart style="position: absolute;top: 180px;left: 141px;z-index: 8000">
               <ul id="autoUl"></ul>
          	</div> 
            <div class="header_content_right">
            	<img src="<c:url value="/views/jsp/center/resources/images/common/phone.png" />" width="179" height="41" />
            </div>
    </div>
    <div class="header_footer">
    	<div class="header_footer_div">
<!--         	<div class="header_footer_left">
            	<a href="#">会员中心</a>
            </div> -->
            <div class="header_footer_nav">
            	<ul>
                	<li class="">
                    	<a href="<c:url value="/showIndex.s" />">首页</a>
                    </li>
                    <li>
                    	<a href="<c:url value="/product/searchProduct.s" />">商品列表</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="header_footer_xian"></div>
    </div>
</div>
<div class="mainbox">
	<div class="main_nav fl"> 
	<c:if test="${not empty sessionScope.WEB_USER_TOKEN}">
        <ul>
          
          <li>
             <h2  style="margin-top:0px; border-top:0;">产品管理</h2>
<%--              <p><a href="<c:url value="/views/jsp/center/trade/shoppingcart/c_shopping_cart_list.jsp" />">我的购物车</a></p>
             <p><a href="<c:url value="/views/jsp/center/trade/order/c_order_list.jsp" />">我的订单</a></p>
             <p><a href="<c:url value="/views/jsp/center/trade/order/c_order_return_list.jsp" />">退货申请</a></p> --%>
             <p><a href="<c:url value="/views/jsp/center/trade/favorites/c_favorites_list.jsp" />">我的收藏</a></p>
          </li>
           <li>
             <h2>用户管理</h2>
             <p><a href="<c:url value="/views/jsp/center/c_user_my_information.jsp" />">个人信息</a></p>
             <p><a href="<c:url value="/views/jsp/center/c_user_password.jsp" />">密码变更</a></p>
<%--              <p><a href="<c:url value="/views/jsp/center/address/c_user_shipping_address.jsp" />">收货地址管理</a></p> --%>
          </li>
           <li>
             <h2>其他管理</h2>
             <p><a href="<c:url value="/views/jsp/center/other/c_user_suggest.jsp" />">投诉与咨询</a></p>
             <p><a href="<c:url value="/views/jsp/center/other/c_user_suggest_list.jsp" />">回复查询</a></p>
             <p><a href="<c:url value="/views/jsp/center/other/c_searchBatchPaper_list.jsp" />">资料下载</a></p>
          </li>
        </ul>
    </c:if>
    
    <c:if test="${not empty sessionScope.WEB_PROVIDER_TOKEN}">
        <ul>
           <li>
             <h2 style="margin-top:0px; border-top:0;">供货商管理</h2>
             <c:if test="${sessionScope.WEB_PROVIDER_TOKEN.levelId eq 2}">
             	<p><a href="<c:url value="/views/jsp/center/sale/c_s_sale_details.jsp" />">销售流向</a></p>
             	<p><a href="<c:url value="/views/jsp/center/sale/c_s_stockIn.jsp" />">采购流向</a></p>
             	<p><a href="<c:url value="/views/jsp/center/sale/c_s_stock.jsp" />">库存查询</a></p>
             </c:if>
             <p><a href="<c:url value="/views/jsp/center/c_user_my_information.jsp" />">个人信息</a></p>
             <p><a href="<c:url value="/views/jsp/center/c_user_password.jsp" />">密码变更</a></p>
          </li>
          <li>
             <h2 style="margin-top:0px; border-top:0;">资料维护</h2>
             <p><a href="<c:url value="/views/jsp/center/other/c_searchBatchPaper_list.jsp" />">资料下载</a></p>
             <p><a href="<c:url value="/views/jsp/center/provider/c_provider_product_list.jsp" />">商品说明书</a></p>
          </li>
        </ul>
    </c:if>
     <c:if test="${not empty sessionScope.WEB_AGENT}">
     	<ul>
           <li>
             <h2 style="margin-top:0px; border-top:0;">业务员菜单</h2>
             <p><a href="<c:url value="/views/jsp/center/c_user_my_information.jsp" />">个人信息</a></p>
             <p><a href="<c:url value="/views/jsp/center/c_user_password.jsp" />">密码变更</a></p>
             <c:if test="${sessionScope.WEB_AGENT.salesmanType eq 1}">
	             <p><a href="<c:url value="/views/jsp/center/agent/c_user_agent_buyer.jsp" />">采购商代理</a></p>
             </c:if>
             <c:if test="${sessionScope.WEB_AGENT.salesmanType eq 2 && sessionScope.WEB_AGENT.isAgentProvider eq 0}">
	             <p><a href="<c:url value="/views/jsp/center/agent/c_user_agent_buyer.jsp" />">采购商代理</a></p>
             </c:if>
             <c:if test="${sessionScope.WEB_AGENT.salesmanType eq 2 && sessionScope.WEB_AGENT.isAgentProvider eq 1}">
	             <p><a href="<c:url value="/views/jsp/center/agent/c_user_agent_buyer.jsp" />">采购商代理</a></p>
	             <p><a href="<c:url value="/views/jsp/center/agent/c_user_agent_provider.jsp" />">供货商代理</a></p>
             </c:if>
          </li>
          
        </ul>
     </c:if>
    </div>
 	
<decorator:body />
		
</div>



<c:import url="/views/jsp/include/footer.jsp" />
<script>
	function showHideLayer(id){
		$("#"+id).hide();
	}
	function clr(){
		 if($("#summary").val()=="可输入:药品名|编号|厂家|中药输小数点."){
		     $("#summary").val("");
		 }
	}
	function searchf(){
		if($("#summary").val()!="可输入:药品名|编号|厂家|中药输小数点."){
	        $("#inc_searchProductForm").submit();
	 	}
	}
	$("#summary").autocomplete('<c:url value="/product/searchAjaxProductList.s" />', {
	    delay:10,//延迟10秒  
	    max:10,//最多5条记录  
	    autoFill: false,
	    minChars:1,  
	    matchSubset:1,  
	    cacheLength:10,  
	    matchContains: false,     
	    width:440,  
	    dataType:'json',//返回的数据类型为JSON类型  
	    scroll:false,
	    extraParams: {searchWhere:function(){return encodeURIComponent($('#summary').val());}},
	    parse:function(data){
	    	 //data="[{chsName:'化痔片\54',productCode:'20125012',spell:'HZP'},{chsName:'创灼膏\20g',productCode:'20614811',spell:'CZG'}]";
	         
	       // alert(data);
	      var parsed = [];  
	      //var ret = eval("("+data+")");
	      var ret = data.rows;
	      for(var i=0;i<ret.length;i++){
	          parsed[parsed.length] = {  
	                  data: ret[i],  
	                  value: ret[i].productName,  
	                  result: ret[i].productName //返回的结果显示内容  
	          };  
	      }
	      return parsed;  
	   },
	   formatItem: function(item) {//显示下拉列表的内容  
		   var str = "";
		   if(item.productCode!=""){
			str+="("+item.productCode+")";
		   }
		   if(item.spell!=""){
			str+="("+item.spell+")";
		   }
	       return "<div>"+item.productName+str+"</div>";  
	   },  
	   formatMatch: function(item) {  
	       return item.productName;  
	   },  
	   formatResult:function(item) {  
	       return item.productName;  
	   }
	}).result(function(event, item, formatted) {//把返回的结果内容显示在其他文本框上      
		 $("#summary").val(item.productName); 
	   
	 }); 
	 $("#inc_subSearchBtn").click(function(){
		$("#inc_searchProductForm").submit();
	 });
</script>	
</body>
</html>